//
//  ExplorationListModel.m
//  __PRODUCTNAME__
//
//  Created by Hanlingyu on 16/08/31
//  Copyright (c) ltq. All rights reserved.
//

#import "ExplorationListModel.h"
#import "ExplorationListContent.h"

@implementation ExplorationListModel

//- (void)setValue:(id)value forKey:(NSString *)key {
//    [super setValue:value forKey:key];
//    if ([key isEqualToString:@"content"]) {
//        NSMutableArray *array = [NSMutableArray array];
//        for (NSDictionary *dic in value) {
//            ExplorationListContent *explorationContent = [ExplorationListContent modelWithDic:dic];
//            [array addObject:explorationContent];
//        }
//        _content = array;
//    }
//}

- (void)setValue:(id)value forKey:(NSString *)key {
    [super setValue:value forKey:key];
    if ([key isEqualToString:@"content"]) {
        NSMutableArray *array = [NSMutableArray array];
        for (NSDictionary *dic in value) {
            ExplorationListContent *content = [ExplorationListContent modelWithDic:dic];
            [array addObject:content];
        }
        _content = array;
    }
    
}



+ (NSDictionary *)objectClassInArray{
    return @{@"content" : [ExplorationListContent class]};
}

@end
